
// 简单封装请求 2018-11-7 10:53 lgx

import Taro from '@tarojs/taro'
import API from './api'

const baseUrl = 'https://api.ts57.cn/app'

const http = params => {
  return Taro.request({
    url: baseUrl + (API[params.url] || ''),
    data: params.data || {},
    header: {
      'content-type': 'application/json'
    }
  })
}

export default http

